cmake_minimum_required(VERSION 3.10)
# 最小需要的CMake版本

project(game-server)
# 项目名称

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build/)
# 可执行文件输出目录

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
# 扫描资源文件与头文件

set(LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/)
link_directories(${LIB_DIR})
# 指定引用外部网络通信库

file(GLOB MAIN_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
# 搜索所有资源文件

add_executable(game-server ${MAIN_SRC} Main.cpp)
# 输出可执行文件

target_link_libraries(game-server ${LIB_DIR}/libhv.dll.a)
target_link_libraries(game-server ${LIB_DIR}/libjsoncpp.dll.a)
target_link_libraries(game-server ${LIB_DIR}/libcrossguid-dgb.a)
# 指定链接外部动态库